package com.platform.qujia.dao;

import com.platform.qujia.param.request.OrderPayInfo;
import com.platform.qujia.pojo.CustomerCardUseRecord;
import com.platform.qujia.pojo.dto.CustomerCardUseRecordQueryDTO;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @date 2023/11/15
 */
public interface CustomerCardUseRecordMapper {

    CustomerCardUseRecord getById(Long id);

    //CustomerCardUseRecord getOneNotPaidRecordBetweenCreateTimeAndCreateDesc(@Param("record") CustomerCardUseRecord record, @Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime);

    CustomerCardUseRecord getOneNotPaidRecordBetweenCreateTimeAndCreateDesc(CustomerCardUseRecordQueryDTO queryDTO);

    Integer updateLastRechargeAmtByNo(@Param("rechargeAmt") BigDecimal rechargeAmt,@Param("orderNo") String orderNo);

    Integer countByExampleAndPayTypes(@Param("record") CustomerCardUseRecord record, @Param("payTypes") List<String> payTypes);

    CustomerCardUseRecord getByOrderNo(@Param("orderNo") String orderNo);

    CustomerCardUseRecord getCustomerCardUseRecordByPhoneStationIdOilType(CustomerCardUseRecord customerCardUseRecord);

    CustomerCardUseRecord getCustomerCardUseRecordByOrdNo(OrderPayInfo orderPayInfo);
}
